function promiseResolve(value){
    if(value instanceof Promise){
        return value
    } else if(value instanceof Object && 'then' in value){
        return Promise((resolve, reject) => {
            value.then(resolve, reject)
        })
    } else {
        return Promise((resolve, reject) => {
            resolve(value)
        })
    }
}